package com.wutao.panzh.admin.service.Impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.panzh.entity.InformationItem;
import com.panzh.entity.UserAdminInfo;
import com.wutao.panzh.admin.mapper.InformationItemMapper;
import com.wutao.panzh.admin.mapper.UserAdminInfoMapper;
import com.wutao.panzh.service.UserAdminService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * 负责处理后台页面跳转的service实现类
 */
@Service
public class UserAdminServiceImpl implements UserAdminService {

    @Autowired
    private InformationItemMapper informationItemMapper;

    @Autowired
    private UserAdminInfoMapper userAdminInfoMapper;

    @Override
    public List<InformationItem> getAllInformationItem() {
        return informationItemMapper.selectAll();
    }

    @Override
    public UserAdminInfo getUserAdminInfoBytel(String tel) {
        UserAdminInfo userAdminInfo = new UserAdminInfo();
        userAdminInfo.setPhoneNum(tel);
        UserAdminInfo userAdminInfo1 = userAdminInfoMapper.selectOne(userAdminInfo);
        return userAdminInfo1;
    }
}
